/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.dao;
 
import java.util.List;

import com.legendshop.dao.GenericDao;
import com.legendshop.dao.support.CriteriaQuery;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.model.Attachment;

/**
 * 附件的Dao.
 */

public interface AttachmentDao extends GenericDao< Attachment, Long> {
     
	public abstract Attachment getAttachment(Long id);
	
    public abstract int deleteAttachment(Attachment attachment);
	
	public abstract Long saveAttachment(Attachment attachment);
	
	public abstract void updateAttachment(Attachment attachment);
	
	public abstract PageSupport<Attachment> getAttachment(CriteriaQuery cq);
	
	public abstract void updateAttachmentStsByFilePath(String filePath,int sts);

	public abstract PageSupport<Attachment> getAttachment(Long shopId,Long treeId, int isManaged, int status, int pageSize, String curPageNO,String searchName, Integer imgType);

	public abstract void updateAttachmentFileNameByFilePath(String filePath, String fileName);

	public abstract List<Attachment> getAttachmentByTreeIds(List<Long> ids);
	
	public Attachment getAttachmentByPath(String filePath);

	PageSupport<Attachment> getAttachment(String shopName, int isManaged, int status, int pageSize, String curPageNO,String searchName, Integer imgType);

	PageSupport<Attachment> getPropChildImg(Long treeId, String curPageNO, String orderBy, String searchName, Long shopId);

	public abstract PageSupport<Attachment> getAttachmentPage(String curPageNO, String searchName, String orderBy, Long shopId,Long treeId);
	
 }
